<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Vue中实例的取值和赋值</title>
  <script src="https://cdn.bootcss.com/vue/2.4.2/vue.min.js"></script>
</head>
<body>
总结：vue中$表示用户自定义变量
<div id="vue_det">
  <h1>site : {{site}}</h1>
  <h1>url : {{url}}</h1>
  <h1>Alexa : {{alexa}}</h1>
</div>
<script type="text/javascript">
  // 我们的数据对象
  var data = {site: "菜鸟教程", url: "www.runoob.com", alexa: 10000}
  var vm = new Vue({
    el: '#vue_det',
    data: data
  })

  document.write(vm.$data === data) // true
  document.write("<br>") // true
  document.write(vm.el === document.getElementById('vue_det')) // false
  console.log(vm.$data.alexa); // 打印出10000
  console.log(vm.el); // 打印出undefined
  console.log(document.getElementById('vue_det')); // 打印出id=vue_det元素对象
</script>
</body>
</html>
